﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using AmazonGlacierGUI.UI.Infrastructure.MVVMFramework;
using AmazonGlacierGUI.UI.ViewModels;

namespace AmazonGlacierGUI.UI.Views
{
    /// <summary>
    /// Interaction logic for JobDetails.xaml
    /// </summary>
    public partial class JobDetailsView : Window
    {
        public JobDetailsView()
        {
            InitializeComponent();
            this.Loaded += JobDetailsView_Loaded;
        }

        void JobDetailsView_Loaded(object sender, RoutedEventArgs e)
        {
            Framework.BindViewModel(this,_vm);
        }

        private JobDetailsViewModel _vm;
        public JobDetailsView(JobDetailsViewModel vm):this()
        {
            _vm = vm;       
        }

        private void tbDownloadArchiveToPath_MouseUp(object sender, MouseButtonEventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start(((TextBlock) sender).Text);
            }catch
            {
            }
        }
    }
}
